package com.itheima.operator;

public class OperatorDemo2 {
    public static void main(String[] args) {
        System.out.println("是否合格" + isGoodStudent(180, 100, 25));
        System.out.println("是否合格2" + isGoodStudent(180, 90, 25));
        System.out.println("是否合格3" + isGoodStudent2(5000, 250));
    }

    // 判断一个人的条件 身高180 体重90 年龄 28以内
    public static boolean isGoodStudent(int height, int weight, int age) {
        return height >= 180 && weight >= 90 && age <= 28;
    }

    public static boolean isGoodStudent2(int height, int weight, int age) {
        if (height >= 180 && weight >= 90 && age <= 28) {
            return true;
        } else {
            return false;
        }
    }

    public static boolean isGoodStudent2(int income, int height) {
        boolean result = false;
        if (income >= 100000 || height >= 180) {
            result = true;
        }
        return result;
    }
}
